<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0; padding: 0;
        }
        .box{
            width: 250px;
            height: 270px;
            background-color: aquamarine;
            margin: 100px auto;
        }
        .box span{
            display: block;
            padding-top: 15px;
            color: #333;
            font-size: 20px;
            text-align: center;
        }
        .box .uo{
            margin-top: 20px;
        }
        .box  input{
            width: 150px;
            height: 20px;
            outline: none;
        }
        p{
            display: inline-block;
            width: 70px;
            text-align: justify;
            text-align-last: justify;
        }
        .ul{
            margin-top: 20px;
        }
        #btn{
            
            width: 70px;
            height: 40px;
            margin: auto;
            color: #fff;
            font-size: 16px;
            background-color: #d0021b;
            border: none;
            margin-top: 50px;
            margin-left:50px;
            cursor: pointer;
        }
        #btm{
            text-decoration: none;
            display: inline-block;
            width: 70px;
            height: 40px;
            margin: auto;
            color: #fff;
            font-size: 16px;
            background-color: #d0021b;
            border: none;
            margin-top: 52px;
            cursor: pointer;
            line-height: 40px;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="box">
        <span>华为账号登录</span>
       
            <div class="uo">
                <p>用户名：</p><input type="text" id="un">
            </div>
            <div class="ul">
                <p>密码：</p><input type="password" id="pw">
            </div>
            <input type="submit" name="" value="登录" id="btn">
            <a href="../reg.html" id="btm">注册</a>
        
    </div>
    <script src="./jquery-1.12.4.min.js"></script>
    <script src="./deng copy.js"></script>
    <!-- <script>
        var btn = document.getElementById('btn');// 登录按钮
        var unInp = document.querySelector('#un');
        var pwInp = document.querySelector('#pw');
        btn.onclick=function(){
            var username = unInp.value;
            var password = pwInp.value;
            
            // 把用户名和密码传递到后端
            var xhr = new XMLHttpRequest();
            xhr.open('POST','./interface/log.php');
            xhr.onload = function(){
                console.log(xhr.responseText)
            }
            xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');
            xhr.send(`un=${username}&pw=${password}`)
        }
    </script> -->
</body>
</html>